import { createRouter, createWebHashHistory } from 'vue-router'
import HomeView from '../views/HomeView.vue'
import UserLoginView from '@/views/UserLoginView.vue'
import IndexView from '@/views/IndexView.vue'
import UpdateToken from '@/views/UpdateToken.vue'
import FoodView from '@/views/FoodView.vue'
import ActivityView from '@/views/ActivityView.vue'
import UpdataIfoView from '@/views/UpdataIfoView.vue'
import Record from '@/views/Record.vue'
import AddPet from '@/views/AddPet.vue'
import WeightRecord from '@/views/WeightRecord.vue'
import InformationView from '@/views/InformationView.vue'
import EncyclopediaView from '@/views/EncyclopediaView.vue'
import EncyclopeDetail from '@/views/EncyclopeDetail.vue'
import InforSearchView from '@/views/InforSearchView.vue'
import DietRecord from '@/views/DietRecord.vue'
import PeeRecord from '@/views/PeeRecord.vue'
import HealthRecord from '@/views/HealthRecord.vue'
import ClearRecord from '@/views/ClearRecord.vue'
import Pet from '@/views/pet.vue'
import PetShop from '@/views/PetShop.vue'
import ShopingCartView from '@/views/ShopingCartView.vue'
import OrderView from '@/views/OrderView.vue'
import PayRoll from '@/views/PayRoll.vue'
import GenName from '@/views/GenName.vue'
import BigFileUpload from '@/views/BigFileUpload.vue'
import AppraiseView from '@/views/AppraiseView.vue'
import WsChatView from '@/views/WsChatView.vue'
import EchartsView from '@/views/EchartsView.vue'
import UserChat from '@/views/UserChat.vue'
import Kefu from '@/views/kefu.vue'



const routes = [
  {
    path: '/Kefu',
    name: 'Kefu',
    component: Kefu
  },
  {
    path: '/userchat',
    name: 'userchat',
    component: UserChat
  },
  {
    path: '/echats',
    name: 'echats',
    component: EchartsView
  },
  {
    path: '/wschat',
    name: 'wschat',
    component: WsChatView
  },
  {
    path: '/appraise',
    name: 'appraise',
    component: AppraiseView
  },
  {
    path: '/bigfileup',
    name: 'bigfileup',
    component: BigFileUpload
  },
  {
    path: '/genename',
    name: 'genename',
    component: GenName
  },
  {
    path: '/payroll',
    name: 'payroll',
    component: PayRoll
  },
  {
    path: '/order',
    name: 'order',
    component: OrderView
  },
  {
    path: '/shopingcart',
    name: 'shopingcart',
    component: ShopingCartView
  },
  {
    path: '/petshop',
    name: 'petshop',
    component: PetShop
  },
  {
    path: '/pet',
    name: 'pet',
    component: Pet
  },
  {
    path: '/clear',
    name: 'clear',
    component: ClearRecord
  },
  {
    path: '/health',
    name: 'health',
    component: HealthRecord
  },
  {
    path: '/pee',
    name: 'pee',
    component: PeeRecord
  },
  {
    path: '/diet',
    name: 'diet',
    component: DietRecord
  },
  {
    path: '/inforsearch',
    name: 'inforsearch',
    component: InforSearchView
  },
  {
    path: '/encydetail',
    name: 'encydetail',
    component: EncyclopeDetail
  },
  {
    path: '/encyclopedia',
    name: 'encyclopedia',
    component: EncyclopediaView
  },
{
    path: '/weight',
    name: 'weight',
    component: WeightRecord
  },
  {
    path: '/add',
    name: 'add',
    component: AddPet
  },
  {
    path: '/record',
    name: 'record',
    component: Record
  },
  {
    path: '/info',
    name: 'info',
    component: UpdataIfoView

  },
  {
    path: '/information',
    name: 'information',
    component: InformationView

  },
  {
    path: '/food',
    name: 'food',
    component: FoodView
  },
  {
    path: '/activity',
    name: 'activity',
    component: ActivityView
  },
  {
    path: '/updatetoken',
    name: 'updatetoken',
    component: UpdateToken
  },
  {
    path: '/',
    name: 'index',
    component: IndexView
  },
  {
    path: '/login',
    name: 'login',
    component: UserLoginView
  },
  {
    path: '/home',
    name: 'home',
    component: HomeView
  },
  {
    path: '/about',
    name: 'about',
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: function () {
      return import(/* webpackChunkName: "about" */ '../views/AboutView.vue')
    }
  }
]

const router = createRouter({
  history: createWebHashHistory(),
  routes
})

export default router
